<?php

// Si le fichier de qui d�finie les constantes n'a pas encore �t� appel� on le charge
if (!defined('CONFIGURATION_FILE_LOADED'))
    include( 'includes/configuration_include.php');

if (!defined('DB_CONNEXION_FILE_LOADED')) {
    define('DB_CONNEXION_FILE_LOADED', true, true);
    

    // Connexion � la BDD
    function model_db_connexion($host = DB_DRIVER, $data_base = DB_NAME, $user = DB_LOGIN, $password = DB_PASSWORD) {
        try {
           
            $bdd = new PDO('mysql:host=' . $host . ';dbname=' . $data_base, $user, $password);

            return $bdd;
        } catch (PDOException $e) {
            print "Erreur !: " . $e->getMessage() . "<br/>";
            die();
        }
    }

}
?>